﻿using System;
class SVNConfiguration
{
    private string svnpath;
    public string Svnpath{
        get { return svnpath; }
    }

    private string workingDirectory;
    public string WorkingDirectory{
        get { return workingDirectory; }
    }

    public SVNConfiguration(string svnpath, string workingDirectory){
        this.svnpath = svnpath;
        this.workingDirectory = workingDirectory;
    }
    public SVNConfiguration(){
        setMember();
    }

    private void setMember()
    {
        try
        {
            this.svnpath = System.Configuration.ConfigurationSettings.AppSettings["SvnExe"];
            if (string.IsNullOrEmpty(this.svnpath)){
                throw new Exception();
            }
        }
        catch
        {
            throw new AppSettingsException("SvnExe");
        }

        try
        {
            this.workingDirectory = System.Configuration.ConfigurationSettings.AppSettings["workingDirectory"];
            if (string.IsNullOrEmpty(this.workingDirectory))
            {
                throw new Exception();
            }

        }
        catch
        {
            throw new AppSettingsException("workingDirectory");
        }
    }
}